home *** CD-ROM | disk | FTP | other *** search
- Uses Mouser,Crt,Dos;
-
- Const AA : Array[1..16,1..16] Of Byte =
-
- (
- (0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0),
- (0,0,0,0,0,0,1,2,6,1,0,0,0,0,0,0),
- (0,0,0,0,0,1,7,5,5,6,1,0,0,0,0,0),
- (0,0,0,0,1,7,6,6,6,6,6,1,0,0,0,0),
- (0,0,0,1,7,7,7,7,7,7,7,6,1,0,0,0),
- (0,0,1,7,8,8,8,8,8,8,8,8,6,1,0,0),
- (0,1,7,2,2,2,2,3,4,2,2,2,2,6,1,0),
- (1,7,8,8,8,8,3,1,1,6,8,8,8,8,5,0),
- (1,7,7,7,7,3,1,0,0,1,6,7,7,7,4,0),
- (1,7,6,6,6,3,1,0,0,1,7,6,6,6,3,0),
- (1,7,5,5,5,3,1,1,1,1,8,5,5,5,3,0),
- (1,7,4,4,4,5,6,7,8,2,8,4,4,4,3,0),
- (1,7,5,5,5,4,4,4,4,4,5,5,5,5,3,0),
- (1,6,8,7,6,3,1,1,1,1,6,8,7,6,3,0),
- (1,5,3,3,3,3,1,0,0,1,5,3,3,3,3,0),
- (1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0));
-
- Open : Boolean = False;
-
- Var
- Lb,Rb : Boolean;
- Grid : Array[1..16,1..16] Of Byte;
- X,Y,Z,col,start : Byte;
- ch : Char;
- F : Text;
-
-
- Procedure SetGrid;
- Begin
- For X := 1 To 16 Do
- For Y := 1 To 16 Do
- Begin
- Grid[X,Y] := 0;
- Gotoxy(X,Y); Write('+');
- end;
- Col := 1;
- end;
-
-
- Procedure Load;
- Var X,Y : Word;
- Begin
- X := 1; Y :=1;
- TextColor(15);
- Setgrid;
-
- For X := 1 to 16 Do
- For Y := 1 To 16 Do
- Grid[Y,X] := AA[Y,X];
-
-
- For Y := 1 To 16 do Begin
- For X := 1 To 16 Do Begin
- If Grid[y,x] <> 0 Then Begin Gotoxy(X,Y); TextColor(Grid[y,x]);
- Write('█'); end;
- end;
- end;
- Gotoxy(20,20); Write('This Is The A Font From SoftRock.Fnt By Grant Smith');
- Gotoxy(20,21); Write('See It Can Be Done So This Prog Aint So Bad');
- exit;
- end;
-
- Procedure SaveIt;
- Begin
- If Not Open Then Assign(F,ParamStr(1));
- If Not Open Then Rewrite(F);
- Open := True;
-
- Writeln(F,'Const E : Array[1..16,1..16] Of Byte =');
-
- For Y := 1 To 16 Do Begin
- For X := 1 To 16 Do Begin
-
- If (Z = 1) And (Start = 1) Then Write(F,'((',Grid[X,Y],',') else
- If Z = 1 Then Write(F,'(',Grid[X,Y],',') else
- If (Z = 16) Then Write(F,Grid[X,Y],'),') else
- Write(F,Grid[X,Y],',');
- Inc(Start);
-
- Inc(Z);
- If Z = 17 Then
- Begin
- Z := 1;
- Writeln(f);
- end;
- end;
- end;
-
- Writeln(F);
- Start := 1;
- end;
-
-
- Procedure NewFont;
- Begin
- TextColor(15);
- SaveIt;
- SetGrid;
- end;
-
-
-
- Procedure Keys;
- Begin
- If Ch = '1' Then Col := 1;
- If Ch = '2' Then Col := 2;
- If Ch = '3' Then Col := 3;
- If Ch = '4' Then col := 4;
- If Ch = '5' Then Col := 5;
- If Ch = '6' Then Col := 6;
- If Ch = '7' Then Col := 7;
- If Ch = '8' Then Col := 8;
- If ch = #13 Then Load;
- If (Ch = 'n') Or (Ch = 'N') Then NewFont;
- Ch := #23;
- If KeyPressed Then Ch := Readkey;
- TextColor(Col);
- exit;
- end;
-
- procedure Range;
- Begin
- MouseRange(0,0,15,15);
- end;
-
- Begin
- Start := 1;
- If ParamCount < 1 Then
- Begin
- Writeln('Please Specify A Filename To Save To');
- Writeln('e.g Fonted C:\A.Fnt');
- Halt;
- end;
-
- ClrScr;
- Writeln('Font Editor By Darius Sutherland Crucial D');
- Writeln('Very Basic But Can Produce 16x16 Fonts');
- Writeln('Fonts Depend On Creative Skill');
- Readkey;
- asm
- mov ax,0100h
- mov cx,2607h
- int 10h
- end;
- TextBackGround(0); TextColor(15); Clrscr; LoadMouse;
- Gotoxy(20,10); Write(' Numbers 1 To 8 To Change Colors');
- Gotoxy(20,11); Write('Enter Loads The Ripped Font "A" From SoftRock.Fnt');
- Gotoxy(20,12); Write(' N Starts A New Font + Saves Last To File');
- Gotoxy(20,13); Write(' Use Mouse Lb/Rb To Edit');
- Gotoxy(20,14); Write(' Escape Ends Session And Save Existing Fonts');
-
- Z := 1;
- For X := 1 To 16 Do
- For Y := 1 To 16 Do
- Grid[X,Y] := 0;
- MouseXy(24,70);
- MouseRange(0,0,15,15);
- SetGrid;
- Ch := #0;
- TextColor(Col);
-
- REPEAT
-
- If KeyPressed Then Keys;
- Buttons(Lb,Rb,Lb,Rb);
- {Keys;}
-
- If Lb Then
- Begin
- X := Xpos+1; Y := Ypos+1;
- MouseOff;
- Gotoxy(X,Y);
- Write('█');
- Grid[X,Y] := Col;
- MouseXy(X-1,Y-1);
- LoadMouse;
- Range;
- end;
-
- If Rb Then
- Begin
- X := Xpos+1; Y := Ypos+1;
- MouseOff;
- Gotoxy(X,Y);
- TextColor(15);
- Write('+');
- TextColor(Col);
- MouseXy(X-1,Y-1);
- LoadMouse;
- Grid[X,Y] := 0;
- Range;
- end;
-
-
- UNTIL Ch = #27;
-
- SaveIt;
- If Open Then Close(f);
- TextColor(15);
- TextBackGround(0);
- Clrscr;
- Writeln('Font Editor By Darius Sutherland Crucial D');
- Writeln('All Fonts Save To File');
- Writeln;
- Writeln('18.12.95');
- end.
-